package cn.promonkey.api.user.entity;import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.promonkey.core.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/** @author ninelock-ai */
@Data
@TableName("user")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class User extends BaseEntity {
  /** 用户自增ID */
  @TableId(value = "user_id", type = IdType.AUTO)
  @TableField(value = "user_id")
  private Long userId;
  /** 公司ID */
  @TableField(value = "business_id")
  private Long businessId;
  /** 用户名 */
  @TableField(value = "user_name")
  private String userName;
  /** 姓名 */
  @TableField(value = "name")
  private String name;
  /** 密码 */
  @TableField(value = "password")
  private String password;
  /** 邮箱号 */
  @TableField(value = "email")
  private String email;
  /** 手机号 */
  @TableField(value = "phone")
  private String phone;
  /** 盐 */
  @TableField(value = "salt")
  private String salt;
  /** 最后登录时间 */
  @TableField(value = "last_login_time")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date datetime;
  /** 角色，0，super；1 管理员；2 客户会员； */
  @TableField(value = "type")
  private Integer type;
  /** 状态 */
  @TableField(value = "status")
  private Integer status;
  
  @TableField(value = "openid")
  private String openid;
  @TableField(value = "unionid")
  private String unionid;
}
